package com.kedacom.demo.springjta;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

@Service
@Transactional
public class BizService {

	@Resource
	private UserService userService;

	@Resource
	private ProductService productService;

	public void save(User user, Product product) {
		userService.save(user);
		productService.save(product);
	}

	public void save(Product product, User user) {
		productService.save(product);
		userService.save(user);
	}

}
